import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/article'
  },
  {
    path: '/article',
    name: 'article',
    component:() => import('../views/juejin/ArticleView.vue')
  },
  {
    path: '/article/:id',
    name: 'readArticle',
    component:() => import('../views/juejin/ReadView.vue')
  },
  {
    path: '/boilingPoint',
    name: 'boilingPoint',
    component:() => import('../views/juejin/BoilingPointView.vue')
  },
  {
    path: '/user/:authorId',
    name: 'getUserInfo',
    component:() => import('../views/juejin/UserView.vue')
  },
  {
    path: '/admin/:id',
    name: 'admin',
    component:() => import('../views/juejin/AdminView.vue')
  },
  {
    path: '/notice/:id',
    name: 'notice',
    component:() => import('../views/juejin/NoticeView.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
